<template>
    <div class="personal-rt personal-edge">
    

                    <div class="resume-head">

                        <!-- 编辑信息 -->
                        <div class="resumeedit halfw" style="margin-top: 0px">
                            <div class="resume-photo" style="margin-top: 15px;">
                                <div class="headimg">
                                  
                                    <input type="file" class="upload_input" @change="changeFile" accept="image/*" />
                                    <span class="iconmd iconmd-edit"></span>
                                </div>

                            </div>
                            <div class="form-group" style="width:49%">
                                <label class="control-label">姓名：</label>
                                <div class="resume-controls">
                                    <el-input style="width: 200px" v-model="form.resumeInfo.name"></el-input>
                                    <!-- <input type="text" class="form-control" id="RealName" value="胡远星"> -->
                                </div>
                            </div>
                            <div class="form-group" style="width:49%">
                                <label class="control-label">电话：</label>
                                <div class="resume-controls">
                                    <el-input style="width: 200px" v-model="form.resumeInfo.phone"></el-input>
                                </div>
                            </div>
                            <div class="form-group" style="width:49%">
                                <label class="control-label">邮箱：</label>
                                <div class="resume-controls">
                                    <el-input style="width: 200px" v-model="form.resumeInfo.email"></el-input>
                                </div>
                            </div>
                            <div class="form-group" style="width:49%">
                                <label class="control-label">微信：</label>
                                <div class="resume-controls">
                                    <el-input style="width: 200px" v-model="form.resumeInfo.wechat"></el-input>
                                </div>
                            </div>
                        </div>
                        <!-- /.resumeedit -->
                    </div>
                    <!-- /.resume-head -->

                    <!-- 自述 -->
                    <div class="resume-item" id="selfdesc">
                        <div class="register-tag">
                            概述
                           
                        </div>
                      
                        <!-- 编辑信息 -->
                        <div class="resumeedit">
                            <div class="form-group">
                                <div class="resume-controls" style="width: 100% !important">
                                   
                                    <new-editor :valueData="form.resumeOverview.overview" @getContent="getContent($event,form.resumeOverview,'overview')"></new-editor>


                                </div>
                            </div>
                            <el-row>
                                <el-col :span="12">
                                    <div class="form-group form-flex">
                                        <label class="control-label" style="width: 125px;font-weight:bold">就业限制：</label>
                                        <div class="resume-controls" style="width:380px !important">
                                            <el-input style="width: 220px" v-model="form.resumeOverview.nonCompetition"
                                                placeholder="如：竞业限制"></el-input>
                                        </div>
                                    </div>
                                </el-col>
                                <el-col :span="12">
                                    <div class="form-group form-flex">
                                        <label class="control-label" style="width: 125px;font-weight:bold">入职时间：</label>
                                        <div class="resume-controls" style="width:380px !important">

                                            <el-input style="width: 220px"
                                                v-model="form.resumeOverview.entryTime"></el-input>


                                        </div>
                                    </div>
                                </el-col>

                            </el-row>
                            <div class="form-group" style="width: 100%">
                                <label class="control-label"
                                    style="width:90px;font-weight:bold">定&nbsp;&nbsp;居&nbsp;&nbsp;地：</label>
                                <div class="resume-controls" style="width: 590px !important">
                                    <template v-for="(item, index) in settlement">
                                        <div class="addmain">
                                            <div class="am_left">
                                                <select-address :addressData="item" :chinaData="chinaData"
                                                    :otherData="otherData"></select-address>
                                            </div>


                                            <a class="BusinessLicense" style="margin-left: 5px;width:80px"
                                                v-if="index != 0">
                                                <span @click="deleteWork(settlement, index)"
                                                    style="color: #F5792A;">删除</span></a>

                                            <div class="add_btn" v-if="index == 0" @click="addWork(settlement)">
                                                <span>+</span>
                                            </div>
                                        </div>
                                    </template>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- /.resume-item -->

                    <!-- 基本信息 -->
                    <div class="resume-item" id="userbaseinfo">
                        <div class="register-tag">
                            基本信息
                           
                        </div>
                      
                        <!-- 编辑信息 -->
                        <div class="resumeedit halfw">

                            <div class="form-group">
                                <label class="control-label">出生日期：</label>
                                <div class="resume-controls">
                                    <input type="text" class="Wdate" style="width: 160px" id="entryTime"
                                        @change="changebirthday($event, userMainReme, 'birthday')"
                                        
                                        onclick="WdatePicker({el:this,dateFmt:'yyyy-MM'})" />
                                 
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="control-label">身高：</label>
                                <div class="resume-controls">
                                    <el-input style="width: 160px" v-model="form.resumeInfo.height"
                                        placeholder="cm"></el-input>

                                </div>
                            </div>


                            <div class="form-group">
                                <label class="control-label">驾照：</label>
                                <div class="resume-controls">
                                    <el-select v-model="form.resumeInfo.driverLicense" placeholder="请选择" clearable
                                        style="width: 160px">
                                        <el-option v-for="item in dictInfo.driverLicense" :key="item.value"
                                            :label="item.label" :value="item.value">
                                        </el-option>
                                    </el-select>
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="control-label">性别：</label>
                                <div class="resume-controls">
                                    <el-select filterable placeholder="请选择" clearable
                                        style="width: 160px">



                                        <el-option v-for="item in dictInfo.sex" :key="item.value" :label="item.label"
                                            :value="item.value">
                                        </el-option>


                                    </el-select>

                                </div>
                            </div>


                            <div class="form-group">
                                <label class="control-label">婚否：</label>
                                <div class="resume-controls">
                                    <el-select v-model="form.resumeInfo.marriage" placeholder="请选择" clearable
                                        style="width: 160px">
                                        <el-option v-for="item in dictInfo.maritalStatus" :key="item.value"
                                            :label="item.label" :value="item.value">
                                        </el-option>
                                    </el-select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label">国籍：</label>
                                <div class="resume-controls">
                                    <el-select v-model="form.resumeInfo.nationality" filterable placeholder="请选择"
                                        clearable style="width: 160px">
                                        <el-option v-for="item in countryList" :key="item.id" :label="item.name"
                                            :value="item.id">
                                        </el-option>
                                    </el-select>
                                
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="control-label">民族：</label>
                                <div class="resume-controls">
                                    <el-select v-model="form.resumeInfo.nation" clearable placeholder="请选择"
                                        style="width: 160px">
                                        <el-option v-for="item in dictInfo.ethnicity" :key="item.value"
                                            :label="item.label" :value="item.value">
                                        </el-option>
                                    </el-select>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="control-label">育否：</label>
                                <div class="resume-controls">
                                    <el-select v-model="form.resumeInfo.procreate" placeholder="请选择" clearable
                                        style="width: 160px">
                                        <el-option v-for="item in dictInfo.procreateStatus" :key="item.value"
                                            :label="item.label" :value="item.value">
                                        </el-option>
                                    </el-select>
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="control-label">绿卡：</label>
                                <div class="resume-controls">
                                    <el-select v-model="form.resumeInfo.greenCard" filterable placeholder="请选择"
                                        clearable style="width: 160px">
                                        <el-option v-for="item in countryList" :key="item.id" :label="item.name"
                                            :value="item.id">
                                        </el-option>
                                    </el-select>

                                </div>
                            </div>





                            <div class="form-group">
                                <label class="control-label">政治面貌：</label>
                                <div class="resume-controls">
                                    <el-select v-model="form.resumeInfo.political" placeholder="请选择" clearable
                                        style="width: 160px">
                                        <el-option v-for="item in dictInfo.political" :key="item.value"
                                            :label="item.label" :value="item.value">
                                        </el-option>
                                    </el-select>
                                </div>
                            </div>




                            <div class="form-group">
                                <label class="control-label">体重：</label>
                                <div class="resume-controls">
                                    <el-input id="UserWeight" type="text" v-model="form.resumeInfo.weight"
                                        style="width: 160px" placeholder="kg"></el-input>

                                </div>
                            </div>










                            <div class="form-group" style="width:100%">
                                <label class="control-label">籍贯：</label>
                                <div class="resume-controls">
                                    <template v-for="(item, index) in nativePlace">
                                        <div class="addmain">
                                            <div class="am_left">
                                                <select-address :addressData="item" :chinaData="chinaData"
                                                    :otherData="otherData"></select-address>
                                            </div>

                                        </div>
                                    </template>
                             

                                </div>
                            </div>

                          
                        </div>
                    </div>
                    <!-- /.resume-item -->

                    <!-- 教育情况 -->
                    <div class="resume-item" id="educationinfo">
                        <div class="register-tag">
                            教育情况
                            <div class="resumeedit-btns" @click="addEducations">
                                <span class="iconmd iconmd-add jayeducationadd"></span>
                            </div>
                        </div>

                        <template v-for="(item, index) in form.resumeEducationList">
                            <div>
                                

                                <div class="resumeedit halfw twohalfw">
                                    <div class="form-group">
                                        <label class="control-label">入学时间：</label>
                                        <div class="resume-controls">
                                            <!-- <el-date-picker style="width: 220px"
                                                v-model="form.resumeEducationList[index].enrolDate" format="yyyy 年 MM 月"
                                                value-format="yyyy-MM-dd" type="month" placeholder="选择月">
                                            </el-date-picker> -->
                                            <input type="text" class="Wdate" style="width: 220px" id="entryTime"
                                                @change="changebirthday($event, form.resumeEducationList[index], 'enrolDate')"
                                                :value="form.resumeEducationList[index].enrolDate ? form.resumeEducationList[index].enrolDate.substring(0, 7) : ''"
                                                onclick="WdatePicker({el:this,dateFmt:'yyyy-MM',defaultDate:'2025-09-01'})" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label">毕业时间：</label>
                                        <div class="resume-controls">

                                            <input type="text" class="Wdate" style="width: 220px" id="entryTime"
                                                @change="changebirthday($event, form.resumeEducationList[index], 'graduationDate')"
                                                :value="form.resumeEducationList[index].graduationDate ? form.resumeEducationList[index].graduationDate.substring(0, 7) : ''"
                                                onclick="WdatePicker({el:this,dateFmt:'yyyy-MM',defaultDate:'2025-07-01'})" />

                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label">就读学校：</label>
                                        <div class="resume-controls">
                                            <el-input style="width: 220px"
                                                v-model="form.resumeEducationList[index].school"></el-input>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label">专业：</label>
                                        <div class="resume-controls">
                                            <el-input style="width: 220px" type="text" class="form-control Professional"
                                                v-model="form.resumeEducationList[index].major"></el-input>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="control-label">学校类型：</label>
                                        <div class="resume-controls">
                                            <el-select v-model="form.resumeEducationList[index].schoolType"
                                                placeholder="请选择" style="width: 220px" clearable>
                                                <el-option v-for="json in dictInfo.schoolType" :key="json.value"
                                                    :label="json.label" :value="json.value">
                                                </el-option>
                                            </el-select>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="control-label">学历：</label>
                                        <div class="resume-controls">
                                            <el-select v-model="form.resumeEducationList[index].academic"
                                                placeholder="请选择" style="width: 220px" clearable>
                                                <el-option v-for="json in dictInfo.qualification" :key="json.value"
                                                    :label="json.label" :value="json.value">
                                                </el-option>
                                            </el-select>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="control-label">学历类别：</label>
                                        <div class="resume-controls">
                                            <el-select v-model="form.resumeEducationList[index].qualificationType
                                                " placeholder="请选择" style="width: 220px" clearable>
                                                <el-option v-for="json in dictInfo.qualificationType" :key="json.value"
                                                    :label="json.label" :value="json.value">
                                                </el-option>
                                            </el-select>
                                        </div>
                                    </div>
                                   
                                </div>
                            </div>
                        </template>
                    </div>

                    <div class="resume-item">
                        <div class="register-tag">
                            薪资待遇
                          
                        </div>
                    

                        <div class="resumeedit">
                            <div class="center_div">
                                <span
                                style="margin-left:170px;margin-top:15px;font-size:12px;">说明：相关数据尽量严谨，尽量同“银行流水”或“个人所得税APP”等对应，以免影响背调结果。</span>

                            </div>
                            <div class="form-group">
                                <label class="control-label" style="font-weight:bold;padding-top:10px">现金部分：</label>
                                <div class="resume-controls" style="width:640px !important">
                                    <span>税前年薪</span>

                                    <el-input type="text" v-model="form.resumeSalary.resumeSalaryCash.annualSalary"
                                        style="width: 100px;margin-left:5px" placeholder="万"></el-input>
                                    <span style="margin-left:15px"></span>
                                    <span>其中税前月薪</span>
                                    <el-input type="text" v-model="form.resumeSalary.resumeSalaryCash.monthlySalary"
                                        style="width: 100px;margin-left:5px" placeholder="K"></el-input>
                                    <span style="margin-left:45px"></span>
                                    <span>年底部分</span>
                                    <el-input type="text" v-model="form.resumeSalary.resumeSalaryCash.yearBonus"
                                        style="width: 100px;margin-left:5px" placeholder="万"></el-input>

                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label" style="margin-left:80px;width:60px">补贴等</label>
                                <div class="resume-controls">

                                    <el-input type="textarea" :autosize="{ minRows: 1 }" resize="none"
                                        v-model="form.resumeSalary.resumeSalaryAllowance.allowance">
                                    </el-input>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="control-label" style="font-weight:bold;padding-top:10px">股权部分：</label>
                                <div class="resume-controls" style="width:640px !important">
                                    <span>股份数</span>

                                    <el-input type="text" v-model="form.resumeSalary.resumeSalaryStock.stockQuantity"
                                        style="width: 100px;margin-left:18px" placeholder="股"></el-input>

                                    <span style="margin-left:55px">行权价</span>
                                    <el-input type="text" v-model="form.resumeSalary.resumeSalaryStock.exercisePrice"
                                        style="width: 100px;margin-left:5px" placeholder="元"></el-input>
                                    <span style="margin-left:75px"></span>
                                    <span>现价</span>
                                    <el-input type="text" v-model="form.resumeSalary.resumeSalaryStock.currentPrice"
                                        style="width: 100px;margin-left:5px" placeholder="元"></el-input>
                                    <span style="margin-left:5px"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label" style="font-weight:bold;padding-top:10px">期权部分：</label>
                                <div class="resume-controls">
                                    <span>股份数</span>

                                    <el-input type="text" v-model="form.resumeSalary.resumeSalaryOption.stockQuantity"
                                        style="width: 100px;margin-left:18px" placeholder="股"></el-input>

                                    <span style="margin-left:55px">行权价</span>
                                    <el-input type="text" v-model="form.resumeSalary.resumeSalaryOption.exercisePrice"
                                        style="width: 100px;margin-left:5px" placeholder="元"></el-input>


                                </div>
                            </div>
                            <!-- style="margin-left:80px;width:60px !important" -->
                            <div class="form-group">
                                <label class="control-label" style="margin-left:80px;width:60px">行权条件</label>
                                <div class="resume-controls">

                                    <el-input type="textarea" :autosize="{ minRows: 1 }" resize="none"
                                        v-model="form.resumeSalary.resumeSalaryOption.exerciseCondition">
                                    </el-input>
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="control-label" style="font-weight:bold;padding-top:10px">社保情况：</label>
                                <div class="resume-controls">

                                    <span>缴纳基数</span>

                                    <el-input type="text"
                                        v-model="form.resumeSalary.resumeSalarySocialSecurity.socialSecurityBase"
                                        style="width: 100px;margin-left:5px" placeholder="元"></el-input>

                                </div>
                            </div>



                            <div class="form-group">
                                <label class="control-label" style="font-weight:bold;padding-top:10px">公积金：</label>
                                <div class="resume-controls" style="width:640px !important">

                                    <span>缴纳基数</span>

                                    <el-input type="text" v-model="form.resumeSalary.resumeSalaryHousingFund.fundBase"
                                        style="width: 100px;margin-left:5px" placeholder="元"></el-input>
                                    <span style="margin-left:40px"></span>
                                    <span>个人比例</span>
                                    <el-input type="text"
                                        v-model="form.resumeSalary.resumeSalaryHousingFund.personalRatio"
                                        style="width: 100px;margin-left:5px" placeholder="%"></el-input>
                                    <span style="margin-left:48px"></span>
                                    <span>企业比例</span>
                                    <el-input type="text"
                                        v-model="form.resumeSalary.resumeSalaryHousingFund.companyRatio"
                                        style="width: 100px;margin-left:5px" placeholder="%"></el-input>

                                </div>
                            </div>

                            <div class="form-group">
                                <label class="control-label" style="font-weight:bold;padding-top:10px">企业年金：</label>
                                <div class="resume-controls" style="width:640px !important">

                                    <span>缴纳基数</span>

                                    <el-input type="text"
                                        v-model="form.resumeSalary.resumeSalaryEnterpriseAnnuities.fundBase"
                                        style="width: 100px;margin-left:5px" placeholder="元"></el-input>
                                    <span style="margin-left:40px"></span>
                                    <span>个人比例</span>
                                    <el-input type="text"
                                        v-model="form.resumeSalary.resumeSalaryEnterpriseAnnuities.personalRatio"
                                        style="width: 100px;margin-left:5px" placeholder="%"></el-input>
                                    <span style="margin-left:48px"></span>
                                    <span>企业比例</span>
                                    <el-input type="text"
                                        v-model="form.resumeSalary.resumeSalaryEnterpriseAnnuities.companyRatio"
                                        style="width: 100px;margin-left:5px" placeholder="%"></el-input>

                                </div>
                            </div>


                            <div class="form-group">
                                <label class="control-label" style="margin-left:80px;width:60px">约束条件</label>
                                <div class="resume-controls">

                                    <el-input type="textarea" :autosize="{ minRows: 1 }" resize="none"
                                        v-model="form.resumeSalary.resumeSalaryEnterpriseAnnuities.constraintCondition">
                                    </el-input>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- /.resume-item -->

                    <!-- /.resume-item -->

                    <!-- 职业技能 -->
                    <div class="resume-item">
                        <div class="register-tag">
                            资格证书
                           
                        </div>
                        <!-- 编辑信息 -->
                        <div class="resumeedit">
                            <div class="form-group">
                                <div class="resume-controls" style="width: 100% !important">
                                    <el-input type="textarea" :autosize="{ minRows: 5 }" resize="none"
                                        v-model="form.resumeSkill.resumeSkillCertificateList[0].certificate">
                                    </el-input>

                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 外语水平 -->
                    <div class="resume-item">
                        <div class="register-tag">
                            语言能力
                            <div class="resumeedit-btns">
                                <span class="iconmd iconmd-add jaylanguageadd" @click="addSkillLanguage"></span>
                            </div>
                        </div>
                        <div class="jayprofessionalshow">
                            <div>
                                <div class="resumeedit">
                                    <template
                                        v-for="(item, index) in form.resumeSkill.resumeSkillLanguageList">
                                        <div class="form-group" v-if="item.showEdit">

                                            <div class="resume-controls resume_list">
                                                <el-select
                                                    v-model="form.resumeSkill.resumeSkillLanguageList[index].languageAbility"
                                                    placeholder="请选择语言" style="width: 250px" clearable>
                                                    <el-option v-for="json in dictInfo.language" :key="json.value"
                                                        :label="json.label" :value="json.value">
                                                    </el-option>
                                                </el-select>
                                                <el-select
                                                    v-model="form.resumeSkill.resumeSkillLanguageList[index].languageRequirements"
                                                    placeholder="请选择语言要求" style="width: 250px; margin-left: 10px"
                                                    clearable>
                                                    <el-option v-for="json in dictInfo.languageAbility"
                                                        :key="json.value" :label="json.label" :value="json.value">
                                                    </el-option>
                                                </el-select>

                                             

                                            </div>

                                        </div>
                                    </template>
                                  
                                </div>
                            </div>
                        </div>
                    </div>
                  
                    <!-- 工作履历  -->
                    <div class="resume-item">
                        <div class="register-tag">
                            工作履历详情
                            <div class="resumeedit-btns">
                                <span class="iconmd iconmd-add jayjobadd" @click="addMore()"></span>
                            </div>
                        </div>
                    </div>
                    <template v-for="(item, index) in form.resumeDetailList">
                       

                        <div class="resume-item rescompany">
                            <!-- 编辑信息 -->
                            <div class="resumeedit">
                                <div class="jayparentjob">
                                    <div class="center_div">
                                        <span style="margin-left:170px">一家单位,多个岗位,保存当前岗位后,点击本单位的“编辑”按钮继续添加</span>

                                    </div>
                                    <div class="form-group">
                                        <label class="control-label maxfontbold"><span
                                                style="color:red;width:5px">*</span>在职时间：</label>
                                        <div class="resume-controls" style="width: 580px !important">
                                            <!-- <el-date-picker v-model="form.resumeDetailList[index].workingStart"
                                                type="month" placeholder="选择月" format="yyyy 年 MM 月"
                                                value-format="yyyy-MM-dd" style="width: 245px"></el-date-picker> -->
                                            <input type="text" class="Wdate" style="width: 245px" id="entryTime"
                                                @change="changebirthday($event, form.resumeDetailList[index], 'workingStart', '1')"
                                                :value="form.resumeDetailList[index].workingStart ? form.resumeDetailList[index].workingStart.substring(0, 7) : ''"
                                                onclick="WdatePicker({el:this,dateFmt:'yyyy-MM'})" />
                                            至
                                            <input type="text" class="Wdate" style="width: 245px" id="entryTime"
                                                @change="changebirthday($event, form.resumeDetailList[index], 'workingEnd', '1')"
                                                :disabled="form.resumeDetailList[index].isLong"
                                                :class="{ disabledClass: form.resumeDetailList[index].isLong }"
                                                :value="form.resumeDetailList[index].workingEnd ? form.resumeDetailList[index].workingEnd.substring(0, 7) : ''"
                                                onclick="WdatePicker({el:this,dateFmt:'yyyy-MM'})" />
                                            <!-- <el-date-picker v-model="form.resumeDetailList[index].workingEnd"
                                                type="month" placeholder="选择月" format="yyyy 年 MM 月"
                                                value-format="yyyy-MM-dd" style="width: 245px"></el-date-picker> -->

                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class="jaytonow"
                                                @change="changeDate($event, form.resumeDetailList[index], 1, index)"
                                                type="checkbox"
                                                :checked="form.resumeDetailList[index].isLong" />&nbsp;至今
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label maxfontbold"><span
                                                style="color:red;width:5px">*</span>企业名称：</label>
                                        <div class="resume-controls">
                                            <el-input v-model="form.resumeDetailList[index].company.name"
                                                placeholder="格式：公司全称（简称），有利于HR发现您"></el-input>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="control-label" style="padding-left:5px">企业介绍：</label>
                                        <div class="resume-controls" style="width: 510px !important">
                                            <el-input type="textarea" :autosize="{ minRows: 5 }" resize="none"
                                                v-model="form.resumeDetailList[index].company.introduction">
                                            </el-input>

                                        </div>
                                    </div>

                                    <el-row>
                                        <el-col :span="12">
                                            <div class="form-group">
                                                <label class="control-label">股票代码(如有)：</label>
                                                <div class="resume-controls" style="width: 220px !important">
                                                    <el-input v-model="form.resumeDetailList[index].company.stockCode
                                                        " style="width: 115px"></el-input>
                                                </div>
                                            </div>
                                        </el-col>
                                        <el-col :span="12">
                                            <div class="form-group">
                                                <label class="control-label"
                                                    style="width: 100px !important">市值(如有)：</label>
                                                <div class="resume-controls" style="width: 250px !important">
                                                    <el-input v-model="form.resumeDetailList[index].company.marketValue
                                                        " style="width: 115px"></el-input>
                                                    <span style="margin-left: 10px">万元
                                                        <span v-if="
                                                            form.resumeDetailList[index].company
                                                                .marketValue >= 10000
                                                        " style="margin-left: 10px; color: #fc6c0b">({{
                                                            form.resumeDetailList[index].company
                                                                .marketValue / 10000
                                                        }}亿)</span>
                                                    </span>
                                                </div>
                                            </div>
                                        </el-col>
                                    </el-row>

                                    <el-row>
                                        <el-col :span="12">
                                            <div class="form-group">
                                                <label class="control-label">年营收(产能)：</label>
                                                <div class="resume-controls" style="width: 220px !important">
                                                    <el-input id="professionalneed" style="width: 115px" type="number"
                                                        v-model="form.resumeDetailList[index].company.annualRevenue
                                                            "></el-input>
                                                    <span style="margin-left: 10px">万元
                                                        <span v-if="
                                                            form.resumeDetailList[index].company
                                                                .annualRevenue >= 10000
                                                        " style="margin-left: 10px; color: #fc6c0b">({{
                                                            form.resumeDetailList[index].company
                                                                .annualRevenue / 10000
                                                        }}亿)</span>
                                                    </span>
                                                </div>
                                            </div>
                                        </el-col>
                                        <el-col :span="12">
                                            <div class="form-group">
                                                <label class="control-label"
                                                    style="width: 100px !important">资产总额：</label>
                                                <div class="resume-controls" style="width: 250px !important">
                                                    <el-input id="professionalneed" type="number" style="width: 115px"
                                                        placeholder="资产总额" v-model="form.resumeDetailList[index].company.totalAssets
                                                            "></el-input>
                                                    <span style="margin-left: 10px">万元<span v-if="
                                                        form.resumeDetailList[index].company
                                                            .totalAssets >= 10000
                                                    " style="margin-left: 10px; color: #fc6c0b">({{
                                                        form.resumeDetailList[index].company
                                                            .totalAssets / 10000
                                                            }}亿)</span></span>
                                                </div>
                                            </div>
                                        </el-col>
                                    </el-row>

                                    <div class="form-group">
                                        <label class="control-label maxfontbold"> <span
                                                style="color:red;width:5px">*</span>所属行业：</label>
                                        <div class="resume-controls">


                                            <div class="select_input"
                                                @click="showSelectEnterpriseIndustry(form.resumeDetailList[index].company, 'enterpriseIndustry', 'enterpriseIndustryStr')">
                                                <span>{{ form.resumeDetailList[index].company.enterpriseIndustryStr
                                                }}</span>
                                            </div>

                                        </div>
                                    </div>
                                    <el-row>
                                        <el-col :span="12">

                                            <div class="form-group">
                                                <label class="control-label">企业规模：</label>
                                                <div class="resume-controls" style="width:175px !important">
                                                    <el-select clearable v-model="form.resumeDetailList[index].company.enterpriseScale
                                                        " placeholder="请选择企业规模" style="width: 100%">
                                                        <el-option v-for="json in dictInfo.enterpriseScale"
                                                            :key="json.value" :label="json.label" :value="json.value">
                                                        </el-option>
                                                    </el-select>
                                                </div>
                                            </div>
                                        </el-col>
                                        <el-col :span="12">
                                            <div class="form-group">
                                                <label class="control-label"
                                                    style="width:100px !important">企业性质：</label>
                                                <div class="resume-controls" style="width:175px !important">
                                                    <el-select clearable v-model="form.resumeDetailList[index].company.enterpriseNature
                                                        " placeholder="请选择企业性质" style="width: 100%">
                                                        <el-option v-for="json in dictInfo.enterpriseNature"
                                                            :key="json.value" :label="json.label" :value="json.value">
                                                        </el-option>
                                                    </el-select>
                                                </div>
                                            </div>
                                        </el-col>
                                    </el-row>
                                    <el-row>
                                        <el-col :span="12">
                                            <div class="form-group">
                                                <label class="control-label">上市类型：</label>
                                                <div class="resume-controls" style="width:175px !important">
                                                    <el-select clearable v-model="form.resumeDetailList[index].company.listingType
                                                        " placeholder="请选择上市类型" multiple collapse-tags style="width: 100%">
                                                        <el-option v-for="json in dictInfo.listingType"
                                                            :key="json.value" :label="json.label" :value="json.value">
                                                        </el-option>
                                                    </el-select>
                                                </div>
                                            </div>
                                        </el-col>
                                        <el-col :span="12">
                                            <div class="form-group">
                                                <label class="control-label"
                                                    style="width:100px !important">企业人数：</label>
                                                <div class="resume-controls" style="width: 175px !important">
                                                    <el-input v-model="form.resumeDetailList[index].company.staffsNum"
                                                        style="width: 140px"></el-input>
                                                    <span style="margin-left: 10px">(约)</span>
                                                </div>
                                            </div>
                                        </el-col>
                                    </el-row>

                                    <div class="form-group" style="margin-bottom:30px !important">
                                        <label class="control-label">公众号/官网：</label>
                                        <div class="resume-controls">
                                            <el-input v-model="form.resumeDetailList[index].company
                                                .wechatOfficialAccount
                                                "></el-input>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <!-- <div class="borderdashed"></div> -->



                            <template v-for="(res, resindex) in form.resumeDetailList[index].resumePostList">
                                <div class="resumeedit" style="margin-top: 10px;">
                                    <div class="jayparentjob">

                                        <div class="form-group">
                                            <div class="desc_title" @click="res.showChild = !res.showChild">
                                                <span style="margin-left:315px">岗位,若属于下属公司，请填写下属公司情况</span>
                                                <i class="iconfont icon-zhankai" v-if="!res.showChild"></i>
                                                <i class="iconfont icon-shouqi" v-else></i>
                                            </div>

                                            <div class="main_content" v-if="res.showChild">
                                                <div class="form-group">
                                                    <label class="control-label">下属公司名称：</label>
                                                    <div class="resume-controls">
                                                        <el-input v-model="res.subsidiaryCompany.name
                                                            " placeholder="格式：公司全称（简称），有利于HR发现您"></el-input>
                                                    </div>
                                                </div>

                                                <div class="form-group">
                                                    <label class="control-label">下属公司介绍：</label>
                                                    <div class="resume-controls" style="width: 510px !important">

                                                        <el-input type="textarea" :autosize="{ minRows: 5 }"
                                                            resize="none" v-model="res.subsidiaryCompany.introduction">
                                                        </el-input>
                                                    </div>
                                                </div>

                                                <el-row>
                                                    <el-col :span="12">
                                                        <div class="form-group">
                                                            <label class="control-label">股票代码(如有)：</label>
                                                            <div class="resume-controls"
                                                                style="width: 220px !important">
                                                                <el-input v-model="res.subsidiaryCompany
                                                                    .stockCode
                                                                    " style="width: 115px"></el-input>
                                                            </div>
                                                        </div>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <div class="form-group">
                                                            <label class="control-label"
                                                                style="width: 100px !important">市值(如有)：</label>
                                                            <div class="resume-controls"
                                                                style="width: 250px !important">
                                                                <el-input v-model="res.subsidiaryCompany
                                                                    .marketValue
                                                                    " style="width: 115px"></el-input>
                                                                <span style="margin-left: 10px">万元
                                                                    <span v-if="
                                                                        res.subsidiaryCompany
                                                                            .marketValue >= 10000
                                                                    " style="margin-left: 10px; color: #fc6c0b">({{
                                                                        res.subsidiaryCompany
                                                                            .marketValue / 10000
                                                                    }}亿)</span>
                                                                </span>
                                                            </div>
                                                        </div>
                                                    </el-col>
                                                </el-row>

                                                <el-row>
                                                    <el-col :span="12">
                                                        <div class="form-group">
                                                            <label class="control-label">年营收(产能)：</label>
                                                            <div class="resume-controls"
                                                                style="width: 220px !important">
                                                                <el-input id="professionalneed" style="width: 115px"
                                                                    type="number" v-model="res.subsidiaryCompany
                                                                        .annualRevenue
                                                                        "></el-input>
                                                                <span style="margin-left: 10px">万元
                                                                    <span v-if="
                                                                        res.subsidiaryCompany
                                                                            .annualRevenue >= 10000
                                                                    " style="margin-left: 10px; color: #fc6c0b">({{
                                                                        res.subsidiaryCompany
                                                                            .annualRevenue / 10000
                                                                    }}亿)</span>
                                                                </span>
                                                            </div>
                                                        </div>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <div class="form-group">
                                                            <label class="control-label"
                                                                style="width: 100px !important">资产总额：</label>
                                                            <div class="resume-controls"
                                                                style="width: 250px !important">
                                                                <el-input id="professionalneed" type="number"
                                                                    style="width: 115px" placeholder="资产总额" v-model="res.subsidiaryCompany
                                                                        .totalAssets
                                                                        "></el-input>
                                                                <span style="margin-left: 10px">万元<span v-if="
                                                                    res.subsidiaryCompany
                                                                        .totalAssets >= 10000
                                                                " style="margin-left: 10px; color: #fc6c0b">({{
                                                                    res.subsidiaryCompany
                                                                        .totalAssets / 10000
                                                                        }}亿)</span></span>
                                                            </div>
                                                        </div>
                                                    </el-col>
                                                </el-row>

                                                <div class="form-group">
                                                    <label class="control-label">所属行业：</label>
                                                    <div class="resume-controls">


                                                        <div class="select_input"
                                                            @click="showSelectEnterpriseIndustry(res.subsidiaryCompany, 'enterpriseIndustry', 'enterpriseIndustryStr')">
                                                            <span>{{ res.subsidiaryCompany.enterpriseIndustryStr
                                                            }}</span>
                                                        </div>
                                                    </div>
                                                </div>
                                                <el-row>
                                                    <el-col :span="12">
                                                        <div class="form-group">
                                                            <label class="control-label">企业规模：</label>
                                                            <div class="resume-controls" style="width:175px !important">
                                                                <el-select clearable v-model="res.subsidiaryCompany
                                                                    .enterpriseScale
                                                                    " placeholder="请选择企业规模" style="width: 100%">
                                                                    <el-option v-for="json in dictInfo.enterpriseScale"
                                                                        :key="json.value" :label="json.label"
                                                                        :value="json.value">
                                                                    </el-option>
                                                                </el-select>
                                                            </div>
                                                        </div>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <div class="form-group">
                                                            <label class="control-label"
                                                                style="width:100px !important">企业性质：</label>
                                                            <div class="resume-controls" style="width:175px !important">
                                                                <el-select clearable v-model="res.subsidiaryCompany
                                                                    .enterpriseNature
                                                                    " placeholder="请选择企业性质" style="width: 100%">
                                                                    <el-option v-for="json in dictInfo.enterpriseNature"
                                                                        :key="json.value" :label="json.label"
                                                                        :value="json.value">
                                                                    </el-option>
                                                                </el-select>
                                                            </div>
                                                        </div>
                                                    </el-col>
                                                </el-row>
                                                <el-row>
                                                    <el-col :span="12">
                                                        <div class="form-group">
                                                            <label class="control-label">上市类型：</label>
                                                            <div class="resume-controls" style="width:175px !important">
                                                                <el-select clearable v-model="res.subsidiaryCompany.listingType
                                                                    " placeholder="请选择上市类型" collapse-tags multiple
                                                                    style="width: 100%">
                                                                    <el-option v-for="json in dictInfo.listingType"
                                                                        :key="json.value" :label="json.label"
                                                                        :value="json.value">
                                                                    </el-option>
                                                                </el-select>
                                                            </div>
                                                        </div>
                                                    </el-col>
                                                    <el-col :span="12">
                                                        <div class="form-group">
                                                            <label class="control-label"
                                                                style="width:100px !important">企业人数：</label>
                                                            <div class="resume-controls"
                                                                style="width: 175px !important">
                                                                <el-input v-model="res.subsidiaryCompany.staffsNum
                                                                    " style="width: 140px"></el-input>
                                                                <span style="margin-left: 10px">(约)</span>
                                                            </div>
                                                        </div>
                                                    </el-col>
                                                </el-row>

                                                <div class="form-group">
                                                    <label class="control-label">公众号/官网：</label>
                                                    <div class="resume-controls">
                                                        <el-input v-model="res.subsidiaryCompany
                                                            .wechatOfficialAccount
                                                            "></el-input>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>
                                        <div style="width:100%;margin-left:0px">
                                            <div class="form-group">
                                                <label class="control-label">所属部门名称：</label>
                                                <div class="resume-controls">
                                                    <el-input v-model="res.department"></el-input>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label">所属部门介绍：</label>
                                                <div class="resume-controls">
                                                    <el-input type="textarea" :autosize="{ minRows: 2 }" resize="none"
                                                        v-model="res.departmentIntroduction">
                                                    </el-input>

                                                </div>
                                            </div>
                                            <div class="bordernext" style="margin-top:20px"></div>

                                            <div class="form-group">
                                                <label class="control-label maxfontbold"><span
                                                        style="color:red;width:5px">*</span>岗位时间：</label>
                                                <div class="resume-controls" style="width: 580px !important">
                                                    <input type="text" class="Wdate" style="width: 245px" id="entryTime"
                                                        @change="changebirthday($event, res, 'workingStart')"
                                                        :value="res.workingStart ? res.workingStart.substring(0, 7) : ''"
                                                        onclick="WdatePicker({el:this,dateFmt:'yyyy-MM'})" />
                                                    至
                                                    <input type="text" class="Wdate entryTime" style="width: 245px"
                                                        @change="changebirthday($event, res, 'workingEnd')"
                                                        :disabled="res.isLong" :class="{ disabledClass: res.isLong }"
                                                        :value="res.workingEnd ? res.workingEnd.substring(0, 7) : ''"
                                                        onclick="WdatePicker({el:this,dateFmt:'yyyy-MM'})" />
                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input
                                                        :id="'entryTime_' + resindex + '_' + index" class="jaytonow"
                                                        @change="changeDate($event, res)" :checked="res.isLong"
                                                        type="checkbox" />&nbsp;至今
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label maxfontbold"><span
                                                        style="color:red;width:5px">*</span>岗位名称：</label>
                                                <div class="resume-controls">
                                                    <el-input v-model="res.name"
                                                        placeholder="请填写贵司，内部正式、规范称呼"></el-input>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label maxfontbold"> <span
                                                        style="color:red;width:5px">*</span>岗位级别：</label>
                                                <div class="resume-controls">
                                                    <el-select clearable v-model="res.positionRank" placeholder="请选择"
                                                        style="width: 100%">
                                                        <el-option v-for="json in dictInfo.positionRank"
                                                            :key="json.value" :label="json.label" :value="json.value">
                                                        </el-option>
                                                    </el-select>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label maxfontbold"><span
                                                        style="color:red;width:5px">*</span>岗位职能：</label>
                                                <div class="resume-controls">
                                                    <div class="select_input"
                                                        @click="showSelectUserAffiliation(res, 'functionalAffiliation', 'functionalAffiliationName')">
                                                        <span>{{ res.functionalAffiliationName }}</span>
                                                    </div>

                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="control-label">岗位类型：</label>
                                                <div class="resume-controls">
                                                    <el-select clearable v-model="res.postType" placeholder="请选择"
                                                        style="width: 100%">
                                                        <el-option v-for="json in dictInfo.postType" :key="json.value"
                                                            :label="json.label" :value="json.value">
                                                        </el-option>
                                                    </el-select>
                                                </div>
                                            </div>
                                            <div class="bordernext" style="margin-top:20px"></div>

                                            <div class="form-group">
                                                <label class="control-label">直接上级职级：</label>
                                                <div class="resume-controls">
                                                    <el-select clearable v-model="res.directSuperiorRank" multiple
                                                        placeholder="请选择" style="width: 100%">
                                                        <el-option v-for="json in dictInfo.positionRank"
                                                            :key="json.value" :label="json.label" :value="json.value">
                                                        </el-option>
                                                    </el-select>
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="control-label">下属人数：</label>
                                                <div class="resume-controls">
                                                    <el-input v-model="res.subordinateSituationNum"
                                                        type="number"></el-input>
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="control-label">下属情况：</label>
                                                <div class="resume-controls">
                                                    <el-input v-model="res.subordinateSituation"
                                                        placeholder="下属部门或下属模块 名称，方便展示您的管理幅度、管理框架"></el-input>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label">平级岗位：</label>
                                                <div class="resume-controls">
                                                    <el-input v-model="res.equalPost"></el-input>
                                                </div>
                                            </div>



                                            <div class="form-group">
                                                <label class="control-label">内外联系对象：</label>
                                                <div class="resume-controls">
                                                    <el-input type="textarea" :autosize="{ minRows: 2 }" resize="none"
                                                        v-model="res.departmentsAndPositions">
                                                    </el-input>



                                                </div>
                                            </div>

                                            <div class="bordernext" style="margin-top:20px">

                                            </div>

                                            <div class="form-group">
                                                <label class="control-label">出差频率：</label>
                                                <div class="resume-controls">
                                                    <el-select clearable v-model="res.travelFrequency" placeholder="请选择"
                                                        style="width: 100%">
                                                        <el-option v-for="item in dictInfo.travelFrequency"
                                                            :key="item.value" :label="item.label" :value="item.value">
                                                        </el-option>
                                                    </el-select>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label">出差范围：</label>
                                                <div class="resume-controls">
                                                    <el-input type="textarea" :autosize="{ minRows: 1 }" resize="none"
                                                        v-model="res.businessTripScope">
                                                    </el-input>



                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="control-label maxfontbold"> <span
                                                        style="color:red;width:5px">*</span>工作地点：</label>
                                                <div class="resume-controls" style="width: 590px !important">
                                                    <template v-for="(resjson, index) in res.postWorkPlace">
                                                        <div class="addmain" style="width: 590px !important">
                                                            <div class="am_left" style="width: 510px !important">
                                                                <select-address :addressData="resjson"
                                                                    :chinaData="chinaData"
                                                                    :otherData="otherData"></select-address>
                                                            </div>

                                                            <a class="BusinessLicense" style="margin-left: 5px"
                                                                v-if="index != 0">
                                                                <span @click="deleteWork(res.postWorkPlace, index)"
                                                                    style="color: #f5792a">删除</span></a>

                                                            <div class="add_btn" style="width: 75px;" v-if="index == 0"
                                                                @click="addWork(res.postWorkPlace)">
                                                                <span>+</span>
                                                            </div>
                                                        </div>
                                                    </template>
                                                </div>
                                            </div>







                                            <div style="margin-top:20px;margin-bottom:0px">

                                            </div>

                                            <div class="form-group">
                                                <label class="control-label maxfontbold"><span
                                                        style="color:red;width:5px">*</span>岗位职责：</label>
                                                <div class="resume-controls">

                                                    <new-editor :valueData="res.jobResponsibilities" @getContent="getContent($event,res,'jobResponsibilities')"></new-editor>
                                                    
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="control-label">关键业绩：</label>
                                                <div class="resume-controls">
                                                    <new-editor :valueData="res.achievementsAndExperience" @getContent="getContent($event,res,'achievementsAndExperience')"></new-editor>
                                                   
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="control-label">接受新机会原因：</label>
                                                <div class="resume-controls">
                                                    <el-input type="textarea" :autosize="{ minRows: 2 }" resize="none"
                                                        v-model="res.acceptingNewOpportunities">
                                                    </el-input>
                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                 

                                  
                                </div>

                            </template>
                        </div>




                    </template>
                    <!-- /.resume-item -->

                    <div class="resume-item">
                        <div class="register-tag">
                            获奖情况
                            
                        </div>
                       


                        <!-- 编辑信息 -->
                        <div class="resumeedit">
                            <div class="form-group">
                                <div class="resume-controls" style="width: 100% !important">

                                    <div class="resume-controls" style="width: 100% !important">
                                       

                                        <new-editor :valueData="form.resumeSkill.resumeSkillAwardsList[0].importantAwards" @getContent="getContent($event,form.resumeSkill.resumeSkillAwardsList[0],'importantAwards')"></new-editor>
                                    </div>

                                </div>
                            </div>


                        </div>



                    </div>



                    <div class="resume-item">
                        <div class="register-tag">
                            专利情况
                           
                        </div>
                        <!-- 编辑信息 -->
                        <div class="resumeedit">
                            <div class="form-group">
                                <div class="resume-controls" style="width: 100% !important">
                                   

                                    <new-editor :valueData="form.resumeSkill.resumeSkillPatentList[0].patent" @getContent="getContent($event,form.resumeSkill.resumeSkillPatentList[0],'patent')"></new-editor>
                                    
                                </div>

                            </div>
                        </div>

                    </div>


                    <div class="resume-item">
                        <div class="register-tag">
                            培训、社会活动等情况
                            
                        </div>
                      


                        <!-- 编辑信息 -->
                        <div class="resumeedit">
                            <div class="form-group">

                                <div class="resume-controls" style="width: 100% !important">
                                  

                                    <new-editor :valueData="form.resumeTrainingSocialActivities.content" @getContent="getContent($event,form.resumeTrainingSocialActivities,'content')"></new-editor>
                                </div>

                            </div>




                       
                        </div>

                    </div>
     
        <enterprise-industry @closeSelect="closeSelect" :haveSelect="haveSelect" v-if="showSelectIndustry"
            @saveData="saveData" :title="'选择行业'" :selectArry="enterpriseIndustry"></enterprise-industry>
        <enterprise-industry @closeSelect="closeSelectAffiliation" :haveSelect="haveSelect" v-if="showSelectAffiliation"
            @saveData="saveData" :title="'选择职能'" :selectArry="functionalAffiliationList"></enterprise-industry>

    </div>
</template>
<script>
import postHead from "@/components/postHead.vue";
import homeapi from "@/api/api.js";
import userImg from '@/assets/imgs/ai_logo.jpg'
import until from "@/api/until";
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
import postFooterMainVue from "@/components/postFooterMain.vue";

import enterpriseIndustry from '@/components/enterPriseindustry.vue'
import selectAddress from '@/components/selectAddress.vue'
import newEditor from "@/components/newEditor.vue";

import { upload } from "@/api/getpost";
export default {
    name: "login",
    data() {
        return {
            userImg: userImg,
            showzhiye: false,
            showHead: false,
            showUserInfo: false,
            showEdg: false,
            showMore: false,
            showSkill: false,
            showMyInfo: false,

            phone: "",
            haveCheck: false,
            code: "",
            title: "",
            loginType: 1,
            loginCode: 1,
            active: 2,

            editorConfig: {
                autoHeight: true,
                height: 200,
            },
            mode: "default", // 'default' or 'simple'
            editor: null,
            editorNext: null,
            editorNextThree: null,
            editorNextFourth: null,
            editorNextFive: null,
            editorNextSix: null,


            toolbarConfig: {
                toolbarKeys: [
                    //自定义菜单选项

                    "fontSize",
                    "bold",

                    "color",
                    "bgColor",
                    "justifyLeft",
                    "justifyRight",
                    "justifyCenter",
                    "justifyJustify",
                ],
                excludeKeys: ["sub", "sup"],
            },

            workSelect: [],
            previousWorkplaceRequirementsSelect: [],
            settlementRequirementsSelect: [],
            currentWorkplaceRequirementsSelect: [],
            workplaceRequirements: [],
            form: {
                resumeTrainingSocialActivities: {
                    content: '',
                },
                resumeAttachment: {
                    attachment: "",
                },
                resumeSalary: {
                    resumeSalaryAllowance: {
                        allowance: "",
                    },
                    resumeSalaryCash: {
                        annualSalary: "",
                        monthlySalary: "",
                        yearBonus: "",
                    },
                    resumeSalaryEnterpriseAnnuities: {
                        companyRatio: "",
                        constraintCondition: "",
                        fundBase: "",
                        personalRatio: "",
                    },
                    resumeSalaryHousingFund: {
                        companyRatio: "",
                        fundBase: "",
                        personalRatio: "",

                    },
                    resumeSalaryOption: {
                        exerciseCondition: "",
                        exercisePrice: "",
                        stockQuantity: "",
                    },
                    resumeSalarySocialSecurity: {
                        socialSecurityBase: "",
                    },
                    resumeSalaryStock: {
                        currentPrice: "",
                        exercisePrice: "",
                        stockQuantity: "",
                    }
                },
                resumeCareerExpectation: {
                    annualRevenue: "",
                    enterpriseIndustry: [],
                    enterpriseIndustryName: "",
                    enterpriseNature: [],
                    enterpriseScale: [],
                    equityIncentive: [],
                    functionalAffiliation: [],
                    listingType: [],
                    positionRank: [],
                    salaryEnd: "",
                    salaryStart: "",
                    staffsNum: 0,
                    travelFrequency: [],
                    workplaceRequirements: [],
                    workTime: [],
                },
                resumeDetailList: [
                    {
                        company: {
                            annualRevenue: "",
                            enterpriseIndustry: [],
                            enterpriseIndustryStr: "",
                            enterpriseNature: [],
                            enterpriseScale: [],
                            introduction: "",
                            listingType: [],
                            name: "",
                            officialWebsite: "",
                            staffsNum: "",
                            type: "",
                            wechatOfficialAccount: "",
                        },
                        parentCompany: {
                            annualRevenue: "",
                            enterpriseIndustry: [],
                            enterpriseNature: [],
                            enterpriseScale: [],
                            introduction: "",
                            listingType: [],
                            name: "",
                            officialWebsite: "",
                            staffsNum: "",
                            type: "",
                            wechatOfficialAccount: "",
                        },
                        resumePostList: [
                            {
                                showChild: false,
                                acceptingNewOpportunities: "",
                                achievementsAndExperience: "",
                                bonus: "",
                                businessTripScope: "",
                                department: "",
                                departmentIntroduction: "",
                                departmentsAndPositions: "",
                                directSuperiorRank: [],
                                equalPost: "",
                                functionalAffiliation: [],
                                jobResponsibilities: "",
                                name: "",
                                positionRank: "",
                                postType: "1",
                                preTaxMonthlySalary: "",
                                preTaxTotalIncome: "",
                                returnOnEquity: "",
                                subordinateSituation: "",
                                subsidy: "",
                                travelFrequency: "",
                                workPlace: [],
                                workingEnd: "",
                                workingStart: "",
                                subsidiaryCompany: {
                                    annualRevenue: "",
                                    enterpriseIndustry: [],
                                    enterpriseIndustryStr: "",
                                    enterpriseNature: [],
                                    enterpriseScale: [],
                                    introduction: "",
                                    listingType: [],
                                    name: "",
                                    officialWebsite: "",
                                    staffsNum: "",
                                    type: "",
                                    wechatOfficialAccount: "",
                                },
                                postWorkPlace: [],
                            },
                        ],
                        subsidiaryCompanyId: "",
                        workingEnd: "",
                        workingStart: "",
                    },
                ],
                resumeEducationList: [
                    {
                        academic: "",
                        qualificationType: "",
                        school: "",
                        schoolType: "",
                        major: "",
                        enrolDate: "",
                        graduationDate: "",
                    },
                ],
                resumeInfo: {
                    driverLicense: "",
                    email: "",
                    greenCard: "",
                    height: "",
                    marriage: "",
                    name: "",
                    nation: "",
                    nationality: "",
                    nativePlace: "",
                    phone: "",
                    political: "",
                    procreate: "",
                    settlement: [],
                    wechat: "",
                    weight: "",
                    workplace: [],
                },
                resumeOverview: {
                    entryTime: "",
                    nonCompetition: "",
                    overview: "",
                },
                resumeSkill: {
                    resumeSkillAwardsList: [
                        {
                            importantAwards: "",
                        },
                    ],
                    resumeSkillCertificateList: [
                        {
                            certificate: "",
                        },
                    ],
                    resumeSkillLanguageList: [
                        {
                            languageAbility: "",
                            languageRequirements: "",
                        },
                    ],
                    resumeSkillPatentList: [
                        {
                            patent: "",
                        },
                    ],
                },
                status: 1,
            },
            userForm: {
                inviteCode: "",
                inviter: "",
                inviterPhone: "",
                name: "",
                nickName: "",
                workplace: "",
                idCard: "",
                personHighestDegree: {},
                personImportantUnits: {},
            },
            enterpriseScaleList: [],
            enterpriseIndustry: [],
            enterpriseNatureList: [],
            staffsNumList: [],

            cateProps: {
                value: "value",
                label: "label",
                children: "children",
            },
            props: {
                value: "id",
                label: "text",
                children: "children",
                multiple: true,
            },
            workProps: {
                value: "id",
                label: "name",
                children: "child",
                multiple: true,
                lazy: true,
                lazyLoad(node, resolve) { },
            },
            showCode: true,
            time: 60,
            dictInfo: {},

            functionalAffiliationList: [],
            companyList: [],

            workPlaceList: [],
            workPlaceSecondList: [],
            contentMain: "",
            postId: "",

            settlement: [],
            workplace: [],

            postWorkPlace: [],

            countryList: [],
            nativePlace: [],
            value: "",
            showPrice: false,
            showCertificate: false,
            showImportantAwards: false,
            showShowPatent: false,

            showSelectIndustry: false,


            nowItem: {},
            nowType: "",
            nowName: "",
            haveSelect: [],

            showSelectAffiliation: false,

            chinaData: [],
            otherData: [],
            showShowActivities: false,


            showAction: false,
            resumeChangeList: [],

            showFixedSave: false,
            showDowload:true,
        };
    },
    props: {
        userMainReme: Object,
        userSumeContent: Object,
    },
    components: {
        postHead,
        Editor,
        Toolbar,
        postFooterMainVue,
        enterpriseIndustry,
        selectAddress,
        newEditor
    },
    mounted() {
        let title = this.$route.query.title;

        if (title) {
            this.title = title;
        } else {
            this.title = "AI爱招聘-添加简历";
        }
        this.postId = this.$route.query.id;
        this.getDictList();
        this.getIndustryList();
        this.getFunctionalffiliationList();
        this.getWorkSpace();
        this.getCountry();
        this.getChinaData();
        this.getOtherData();
    },
    methods: {

        getContent(content,item,key){
            item[key]=content
        },

        showActionList() {
            this.showAction = true;
            this.getResumeChangeList();

        },
        getFirstInfoAddress(){
            let reason=""
            if(this.userMainReme.resumeDetails && this.userMainReme.resumeDetails.length>0){
                if(this.userMainReme.resumeDetails[0].resumePostList && this.userMainReme.resumeDetails[0].resumePostList.length>0){
                    reason=this.getWorkSpaceName(this.userMainReme.resumeDetails[0].resumePostList[0].workplace)
                }
            }
            return reason
        },

        getFirstInfoReson(){
            let reason=""
            if(this.userMainReme.resumeDetails && this.userMainReme.resumeDetails.length>0){
                if(this.userMainReme.resumeDetails[0].resumePostList && this.userMainReme.resumeDetails[0].resumePostList.length>0){
                    reason=this.userMainReme.resumeDetails[0].resumePostList[0].acceptingNewOpportunities
                }
            }
            return reason
            // this.userMainReme.resumeDetails.map(res=>{
            //     res.
            // })

        },


        refreshReme(){
            this.$emit("refreshReme")
        },

        async getResumeChangeList() {
            let data = await homeapi.getResumeChangeList();
            if (data.code == 200) {
                this.resumeChangeList = data.result
            }
        },

        getOther(content) {
            const plainText = this.htmlToText(content)
            return plainText
        },
        htmlToText(html) {
            return html
                .replace(/<[^>]*>/g, '') // 移除所有HTML标签  
                .replace(/&nbsp;/gi, ' ') // 将HTML实体转换为字符  
                .replace(/<br\s*\/?>/gi, '\n') // 将换行符替换为实际的换行符  
                // ... 可以添加更多替换规则来处理其他HTML实体或特殊字符  
                ;
        },
        showItemMore(item, index) {
            item.showMore = true;
            console.log(item)
            this.showDowload=false
            let jsonData = {
                first: this.workPlaceList[0].id,
                secondWorkList: this.workPlaceList[0].child,
                second: this.workPlaceList[0].child[0].id,
                thirdWorkList: [],
                third: "",
                fourthWorkList: [],
                fourth: "",
                five: "",
                fiveWorkList: [],
            };
            let dataMain = {
                showChild: false,
                acceptingNewOpportunities: "",
                achievementsAndExperience: "",
                bonus: "",
                businessTripScope: "",
                department: "",
                departmentIntroduction: "",
                departmentsAndPositions: "",
                directSuperiorRank: [],
                equalPost: "",
                functionalAffiliation: [],
                jobResponsibilities: "",
                name: "",
                positionRank: "",
                postType: "1",
                preTaxMonthlySalary: "",
                preTaxTotalIncome: "",
                returnOnEquity: "",
                subordinateSituation: "",
                subsidy: "",
                travelFrequency: "",
                workPlace: [],
                workingEnd: "",
                workingStart: "",
                subsidiaryCompany: {
                    annualRevenue: "",
                    enterpriseIndustry: [],
                    enterpriseIndustryStr: "",
                    enterpriseNature: [],
                    enterpriseScale: [],
                    introduction: "",
                    listingType: [],
                    name: "",
                    officialWebsite: "",
                    staffsNum: "",
                    type: "",
                    wechatOfficialAccount: "",
                },
                postWorkPlace: [jsonData],
            }

            if (this.form.resumeDetailList[index].resumePostList.length == 0) {

                this.form.resumeDetailList[index].resumePostList.push(JSON.parse(JSON.stringify(dataMain)))

            }

        },
        showzhiyeContent() {
            this.showzhiye = true;
            this.showDowload=false;
            if (this.workSelect) {

            }
        },

        changeDate(val, json, type, index) {

            if (val.target.checked) {
                json.isLong = true
                json.workingEnd = ""
            }
            else {
                json.isLong = false;
            }
            if (type == 1) {
                if (json.resumePostList.length == 1) {
                    if (val.target.checked) {
                        json.resumePostList[0].isLong = true;
                        json.resumePostList[0].workingEnd = "";
                        document.getElementById("entryTime_0_" + index).checked = true
                    }
                    else {
                        json.resumePostList[0].isLong = false;
                        document.getElementById("entryTime_0_" + index).checked = false
                    }


                }
            }

            this.$forceUpdate();

        },


        closeSelectAffiliation() {
            this.showSelectAffiliation = false;
        },

        saveData(item) {
            this.nowItem[this.nowType] = item.arryList
            this.nowItem[this.nowName] = item.arryName
            this.closeSelect();
            this.closeSelectAffiliation();
        },

        showSelectEnterpriseIndustry(nowItem, nowType, nowName) {
            this.nowItem = nowItem
            this.nowType = nowType
            this.nowName = nowName

            this.haveSelect = nowItem[nowType]

            this.showSelectIndustry = true
        },
        showSelectUserAffiliation(nowItem, nowType, nowName) {
            this.nowItem = nowItem
            this.nowType = nowType
            this.nowName = nowName

            this.haveSelect = nowItem[nowType]

            this.showSelectAffiliation = true
        },

        closeSelect() {
            this.showSelectIndustry = false;
        },

        async saveSume() {
            let form = this.form;
            if (this.workSelect.length > 0) {
                form.resumeCareerExpectation.workplaceRequirements = [];
                this.workSelect.map((res) => {
                    let jsonData = {
                        continentId: res.first,
                        countryId: res.second,
                        province: res.third,
                        city: res.fourth,
                        district: res.five,
                    };
                    if (!res.first && res.third) {
                        jsonData = {
                            continentId: res.third,
                            countryId: res.fourth,
                            province: res.five,
                            city: "",
                            district: ""
                        }
                    }

                    form.resumeCareerExpectation.workplaceRequirements.push(jsonData);
                });
            }
            if (form.resumeOverview.entryTime == "") {
                form.resumeOverview.entryTime = "30天内"
            }

            if (this.settlement.length > 0) {
                form.resumeInfo.settlement = [];
                this.settlement.map((res) => {
                    let jsonData = {
                        continentId: res.first,
                        countryId: res.second,
                        province: res.third,
                        city: res.fourth,
                        district: res.five,
                    };
                    form.resumeInfo.settlement.push(jsonData);
                });
            }
            if (this.nativePlace.length > 0) {
                let jsonData = {
                    continentId: this.nativePlace[0].first,
                    countryId: this.nativePlace[0].second,
                    province: this.nativePlace[0].third,
                    city: this.nativePlace[0].fourth,
                    district: this.nativePlace[0].five,
                };
                form.resumeInfo.nativePlace = [];

                form.resumeInfo.nativePlace.push(jsonData);
            }
            if (this.workplace.length > 0) {
                form.resumeInfo.workplace = [];
                this.workplace.map((res) => {
                    let jsonData = {
                        continentId: res.first,
                        countryId: res.second,
                        province: res.third,
                        city: res.fourth,
                        district: res.five,
                    };
                    form.resumeInfo.workplace.push(jsonData);
                });
            }

            form.resumeDetailList.map((res) => {
                if (
                    res.company.enterpriseScale &&
                    typeof res.company.enterpriseScale == "string"
                ) {
                    res.company.enterpriseScale = [res.company.enterpriseScale];
                } else {
                    res.company.enterpriseScale = [];
                }


                if (
                    res.company.enterpriseNature &&
                    typeof res.company.enterpriseNature == "string"
                ) {
                    res.company.enterpriseNature = [res.company.enterpriseNature];
                } else {
                    res.company.enterpriseNature = [];
                }
                res.resumePostList.map((json, index) => {
                    if (json.name) {
                        if (
                            json.subsidiaryCompany.enterpriseScale &&
                            typeof json.subsidiaryCompany.enterpriseScale == "string"
                        ) {
                            json.subsidiaryCompany.enterpriseScale = [
                                json.subsidiaryCompany.enterpriseScale,
                            ];
                        } else {
                            json.subsidiaryCompany.enterpriseScale = [];
                        }

                        if (
                            json.subsidiaryCompany.enterpriseNature &&
                            typeof json.subsidiaryCompany.enterpriseNature == "string"
                        ) {
                            json.subsidiaryCompany.enterpriseNature = [
                                json.subsidiaryCompany.enterpriseNature,
                            ];
                        } else {
                            json.subsidiaryCompany.enterpriseNature = [];
                        }
                        if (json.postWorkPlace.length > 0) {
                            json.workPlace = [];
                            json.postWorkPlace.map(resjson => {
                                let jsonData = {
                                    continentId: resjson.first,
                                    countryId: resjson.second,
                                    province: resjson.third,
                                    city: resjson.fourth,
                                    district: resjson.five,
                                };
                                json.workPlace.push(jsonData);
                            })
                        }
                    }
                    else {
                        res.resumePostList.splice(index, 1)
                    }
                });
            });
            this.$emit("saveSume", form);
            this.showzhiye = false;
            this.showSkill = false;
            this.showHead = false;
            this.showMyInfo = false;
            this.showUserInfo = false;
            this.showCertificate = false
            this.showImportantAwards = false
            this.showShowPatent = false;
            this.showShowActivities = false;
            this.showPrice = false;
        },

        changebirthday(e, item, data, type) {

            item[data] = e.target.realValue;
            if (type == 1) {
                if (item.resumePostList.length == 1) {
                    item.resumePostList[0][data] = e.target.realValue
                }
            }
        },

        getForm() {
            
        },

        getPostInfoMain(value, type) {
            let name = "";
            if (this.dictInfo[type]) {
                this.dictInfo[type].map((res) => {
                    if (res.value == value) {
                        name = res.label;
                    }
                });
            }

            return name;
        },
        addEducations() {
            this.showDowload=false
            this.form.resumeEducationList.push({
                academic: "",
                qualificationType: "",
                school: "",
                schoolType: "",
                major: "",
                enrolDate: "",
                graduationDate: "",
            });
        },

        addMore() {
            this.showDowload=false
            let jsonData = {
                first: this.workPlaceList[0].id,
                secondWorkList: this.workPlaceList[0].child,
                second: this.workPlaceList[0].child[0].id,
                thirdWorkList: [],
                third: "",
                fourthWorkList: [],
                fourth: "",
                five: "",
                fiveWorkList: [],
            };
            let moreData = {
                company: {
                    annualRevenue: "",
                    enterpriseIndustry: [],
                    enterpriseIndustryStr: "",
                    enterpriseNature: [],
                    enterpriseScale: [],
                    introduction: "",
                    listingType: [],
                    name: "",
                    officialWebsite: "",
                    staffsNum: "",
                    type: "",
                    wechatOfficialAccount: "",
                },
                parentCompany: {
                    annualRevenue: "",
                    enterpriseIndustry: [],
                    enterpriseNature: [],
                    enterpriseScale: [],
                    introduction: "",
                    listingType: [],
                    name: "",
                    officialWebsite: "",
                    staffsNum: "",
                    type: "",
                    wechatOfficialAccount: "",
                },
                resumePostList: [
                    {
                        showChild: false,
                        acceptingNewOpportunities: "",
                        achievementsAndExperience: "",
                        bonus: "",
                        businessTripScope: "",
                        department: "",
                        departmentIntroduction: "",
                        departmentsAndPositions: "",
                        directSuperiorRank: [],
                        equalPost: "",
                        functionalAffiliation: [],
                        jobResponsibilities: "",
                        name: "",
                        positionRank: "",
                        postType: "1",
                        preTaxMonthlySalary: "",
                        preTaxTotalIncome: "",
                        returnOnEquity: "",
                        subordinateSituation: "",
                        subsidy: "",
                        travelFrequency: "",
                        workPlace: [],

                        workingEnd: "",
                        workingStart: "",
                        subsidiaryCompany: {
                            annualRevenue: "",
                            enterpriseIndustry: [],
                            enterpriseIndustryStr: "",
                            enterpriseNature: [],
                            enterpriseScale: [],
                            introduction: "",
                            listingType: [],
                            name: "",
                            officialWebsite: "",
                            staffsNum: "",
                            type: "",
                            wechatOfficialAccount: "",
                        },
                        postWorkPlace: [jsonData],
                    },
                ],
                subsidiaryCompanyId: "",
                workingEnd: "",
                workingStart: "",
                showMore: true,
            };

            if (
                this.userMainReme.resumeDetails.length >= 1 &&
                this.userMainReme.resumeDetails[0].company.name
            ) {
                this.form.resumeDetailList.push(JSON.parse(JSON.stringify(moreData)));
                this.userMainReme.resumeDetails.push(
                    JSON.parse(JSON.stringify(moreData))
                );
            } else if (
                this.userMainReme.resumeDetails.length == 1 &&
                !this.userMainReme.resumeDetails[0].company.name
            ) {
                this.userMainReme.resumeDetails[0].showMore = true;
            } else if (this.userMainReme.resumeDetails.length == 0) {
                this.form.resumeDetailList.push(JSON.parse(JSON.stringify(moreData)));
                this.userMainReme.resumeDetails.push(
                    JSON.parse(JSON.stringify(moreData))
                );
            }
            this.showFixedSave = true;
        },

        editEducation(item) {
            item.showEdg = true;
            this.showDowload=false
        },

        deleteEducation(index) {
            this.form.resumeEducationList.splice(index, 1);
            this.userMainReme.resumeEducations.splice(index, 1);
            this.saveSume();
        },
        deleteSkillLanguage(arry, index, type) {
            arry.splice(index, 1);
            arry.splice(index, 1);
            if (type == 1) {
                this.saveSume();
            }

        },
        showSkillEdit() {
            this.showSkill = true;
            if (
                this.form.resumeSkill.resumeSkillLanguageList &&
                this.form.resumeSkill.resumeSkillLanguageList.length == 0
            ) {
                this.form.resumeSkill.resumeSkillLanguageList = [
                    {
                        languageAbility: "",
                        languageRequirements: "",
                    },
                ];
            }
        },
        addSkillLanguage() {
            this.showDowload=false
            if (this.form.resumeSkill.resumeSkillLanguageList && this.form.resumeSkill.resumeSkillLanguageList.length == 0) {
                this.form.resumeSkill.resumeSkillLanguageList = [
                    {
                        languageAbility: "",
                        languageRequirements: "",
                        showEdit: true
                    },
                ];
                this.userMainReme.resumeSkills.resumeSkillLanguageList = [
                    {
                        languageAbility: "",
                        languageRequirements: "",
                        showEdit: true
                    },
                ]

            }
            else if (this.form.resumeSkill.resumeSkillLanguageList && this.form.resumeSkill.resumeSkillLanguageList.length == 1 && !this.form.resumeSkill.resumeSkillLanguageList[0].languageAbility) {
                this.form.resumeSkill.resumeSkillLanguageList = [
                    {
                        languageAbility: "",
                        languageRequirements: "",
                        showEdit: true,
                    },
                ];
                this.userMainReme.resumeSkills.resumeSkillLanguageList = [
                    {
                        languageAbility: "",
                        languageRequirements: "",
                        showEdit: true
                    },
                ]
            }
            else {
                this.userMainReme.resumeSkills.resumeSkillLanguageList.push(
                    {
                        languageAbility: "",
                        languageRequirements: "",
                        showEdit: true
                    },
                )
                this.form.resumeSkill.resumeSkillLanguageList.push(
                    {
                        languageAbility: "",
                        languageRequirements: "",
                        showEdit: true,
                    },
                )

            }

            this.showSkill = true;



        },

        addCompanyPost(item, index) {
            this.showDowload=false
            let workingStart = ""
            let workingEnd = ""
            let isLong = false
            if (item.resumePostList.length > 0) {
                workingStart = item.resumePostList[item.resumePostList.length - 1].isLong ? '' : item.resumePostList[item.resumePostList.length - 1].workingEnd
                workingEnd = item.isLong ? '' : item.workingEnd
            }
            isLong = item.isLong ? true : false;
            let placeData = {
                first: this.workPlaceList[0].id,
                secondWorkList: this.workPlaceList[0].child,
                second: this.workPlaceList[0].child[0].id,
                thirdWorkList: [],
                third: "",
                fourthWorkList: [],
                fourth: "",
                five: "",
                fiveWorkList: [],
            }
            let jsonData = {
                showChild: false,
                showEdit: true,
                isLong: isLong,
                acceptingNewOpportunities: "",
                achievementsAndExperience: "",
                bonus: "",
                businessTripScope: "",
                department: "",
                departmentIntroduction: "",
                departmentsAndPositions: "",
                directSuperiorRank: [],
                equalPost: "",
                functionalAffiliation: [],
                jobResponsibilities: "",
                name: "",
                positionRank: "",
                postType: "1",
                preTaxMonthlySalary: "",
                preTaxTotalIncome: "",
                returnOnEquity: "",
                subordinateSituation: "",
                subsidy: "",
                travelFrequency: "",
                workPlace: [],

                workingEnd: "",
                workingStart: "",
                subsidiaryCompany: {
                    annualRevenue: "",
                    enterpriseIndustry: [],
                    enterpriseIndustryStr: "",
                    enterpriseNature: [],
                    enterpriseScale: [],
                    introduction: "",
                    listingType: [],
                    name: "",
                    officialWebsite: "",
                    staffsNum: "",
                    type: "",
                    wechatOfficialAccount: "",
                },
                postWorkPlace: [placeData],
            }

            item.resumePostList.unshift(JSON.parse(JSON.stringify(jsonData)));
            this.form.resumeDetailList[index].resumePostList.unshift(JSON.parse(JSON.stringify(jsonData)));
            this.$forceUpdate();

        },

        deleteWork(worklist, index) {
            worklist.splice(index, 1);
        },

        deleteDetail(index) {
            this.form.resumeDetailList.splice(index, 1);
            this.userMainReme.resumeDetails.splice(index, 1);
            this.saveSume();
        },

        addInfoExperienceRequirements() {
            this.form.infoExperienceRequirements.items.push({
                engagedYear: "",
                functionalAffiliation: [],
                industry: [],
                positionRank: "",

                workYear: "",
                conditionStr: "or",
                enterpriseNature: [],
                enterpriseScale: [],
                listingType: [],
                staffsNum: "",
                annualRevenue: "",
            });
        },
        addInfoJobRequirementsKeyUnit() {
            this.form.infoJobRequirementsKeyUnit.push({
                annualRevenue: "",
                company: "",
                engagedIn: "",
                enterpriseIndustry: [],
                enterpriseNature: [],
                enterpriseScale: [],
                functionStr: "",
                inRecentYear: "",
                listingType: [],
                numberManagers: "",
                positionHeld: "",
                rank: "",
                staffsNum: "",
                workYear: "",
            });
        },
        addWork(arry) {
            arry.push({
                first: this.workPlaceList[0].id,
                secondWorkList: this.workPlaceList[0].child,
                second: this.workPlaceList[0].child[0].id,
                thirdWorkList: [],
                third: "",
                fourthWorkList: [],
                fourth: "",
                five: "",
                fiveWorkList: [],
            });
            this.changeWorkSecond(arry[arry.length - 1]);
        },

        addSettlementWork() {
            this.settlementRequirementsSelect.push({
                first: this.workPlaceList[0].id,
                secondWorkList: this.workPlaceList[0].child,
                second: this.workPlaceList[0].child[0].id,
                thirdWorkList: [],
                third: "",
                fourthWorkList: [],
                fourth: "",
            });
            this.changeWorkSecond(
                this.settlementRequirementsSelect[
                this.settlementRequirementsSelect.length - 1
                ]
            );
        },
       


        //选择第一个地点
        changeWorkFirst(item) {
            this.workPlaceList.map((res) => {
                if (res.id == item.first) {
                    item.secondWorkList = res.child;
                }
            });
        },

        //获取中国的数据
        async getChinaData() {
            let data = await homeapi.getCountryTree({ id: "1881965479771557890" })
            if (data.code == 200) {
                this.chinaData = data.result
            }
        },
        //获取其他数据
        async getOtherData() {
            let data = await homeapi.getWorkSpaceList();
            if (data.code == 200) {


                let newData = [];
                data.result.map(res => {
                    if (res.child) {
                        res.child.map((json, index) => {
                            if (json.name.indexOf('中国') > -1) {
                                res.child.splice(index, 1);
                            }
                        })
                    }
                })
                newData = JSON.parse(JSON.stringify(data.result))
                this.otherData = newData;

            }
        },


        //选择第二个点
        async changeWorkSecond(item) {
            return new Promise(async (reslove, reject) => {
                let data = await homeapi.getCountryTree({ id: item.second });
                if (data.code == 200) {
                    item.thirdWorkList = data.result;

                    reslove({ data: 1 });
                }
            });
        },
        //选择第三个点
        async changeWorkThird(item) {
            item.thirdWorkList.map((json) => {
                if (json.id == item.third) {
                    item.fourthWorkList = json.child;
                }
            });
        },

        //选择第三个点
        async changeWorkFourth(item) {
            item.fourthWorkList.map((json) => {
                if (json.id == item.fourth) {
                    item.fiveWorkList = json.child;
                }
            });
        },

        //获取工作地点
        async getWorkSpace() {
            let data = await homeapi.getWorkSpaceList();
            if (data.code == 200) {
                data.result.map((res) => {
                    res.text = res.name;
                    res.children = res.child;
                    if (res.child) {
                        res.child.map((json) => {
                            json.text = json.name;
                        });
                    }
                });
                this.workPlaceList = data.result;
                this.getForm();
            }
        },

        async changeFile(e) {
            if (e.target.files.length > 0) {
                let file = e.target.files[0];
                var formData = new FormData();

                formData.append("file", file);
                let data = await homeapi.uploadFile(formData);

                if (data.code == 200) {
                    this.updateResumeImg({ img: data.result.path })

                }
            }
        },

        //上传简历附件
        async uploadFile(e) {
            if (e.target.files.length > 0) {
                let file = e.target.files[0];
                var formData = new FormData();
                formData.append("file", file);
                let data = await homeapi.uploadFile(formData);
                if (data.code == 200) {
                    this.form.resumeAttachment.attachment = data.result.path;
                }
            }
        },

        //更新头像
        async updateResumeImg(form) {
            this.$emit("updateResumeImg", form)

        },

        //获取子公司信息
        async getChildCompanyList() {
            let data = await homeapi.getCompanyList();
            if (data.code == 200) {
                this.companyList = data.result;
            }
        },

        toLogin() {
            this.$router.push("/login/loginnew");
        },
        setActive(type) {
            this.active = type;
        },
        //获取数据字典
        async getDictList() {
            let data = await homeapi.getDictList();
            if (data.code == 200) {
                this.dictInfo = data.result;
            }
        },
        deleteImg() {
            this.form.postImg = "";
            this.form.postImgUrl = "";
        },
        //获取职能列表
        async getFunctionalffiliationList() {
            let data = await homeapi.getFunctionList();
            if (data.code == 200) {
                data.result.map((res) => {
                    res.text = res.name;
                    if (res.child.length > 0) {
                        res.child.map((json) => {
                            json.text = json.name;
                        });
                        res.children = res.child;
                        res.children.map((json) => {
                            if (json.child.length > 0) {
                                json.child.map((item) => {
                                    item.text = item.name;
                                });
                                json.children = json.child;
                            }
                        });
                    }
                });
                this.functionalAffiliationList = data.result;
            }
        },

        //获取行业列表
        async getIndustryList() {
            let data = await homeapi.getIndustryList();
            if (data.code == 200) {
                data.result.map((res) => {
                    res.text = res.name;
                    if (res.child.length > 0) {
                        res.child.map((json) => {
                            json.text = json.name;
                        });
                        res.children = res.child;
                        res.children.map((json) => {
                            if (json.child.length > 0) {
                                json.child.map((item) => {
                                    item.text = item.name;
                                });
                                json.children = json.child;
                            }
                        });
                    }
                });

                this.enterpriseIndustry = data.result;
            }
        },

        getPostName(item) {
            let nameList = [];
            item.resumePostList.map(res => {
                if (res.name) {
                    nameList.push(res.name)
                }

            })
            return nameList.join("、");
        },

        changeWorkLink(item) {

            this.form.infoExperienceRequirements.items.map((res) => {
                res.workLink = item;
            });
        },
        getWorkSpaceName(workPlace) {
             let workPlaceList = [];
            if(workPlace){

           
            let workPlaceName = workPlace.split(",");
           
            workPlaceName.map((res) => {
                if (res.indexOf("中国") > -1) {
                    const nameList = res.split("/");
                    let name = ""
                    if (nameList[2].indexOf('省') > -1) {
                        name = nameList.splice(3, nameList.length).join("-");
                    }
                    else {
                        name = nameList.splice(2, nameList.length).join("-");
                    }


                    workPlaceList.push(name);
                } else {
                    const nameList = res.split("/");
                    let name = nameList.join("-");
                    workPlaceList.push(name);
                }
            });
             }

            return workPlaceList.join(", ");

        },
        //获取国家选择
        async getCountry() {
            let data = await homeapi.getCountry();
            if (data.code == 200) {
                this.countryList = data.result;
            }
        },
        uploadAttachment() {
            this.$refs.uploadattchment.click();
        }
    },
};
</script>

<style src="@wangeditor/editor/dist/css/style.css"></style>
<style>
/* 全局样式 */
.w-e-text-container {
    min-height: 200px !important;
    /* 覆盖行内样式 */
}

.el-collapse-item__header {
    padding-left: 15px;
    box-sizing: border-box;
}

.el-collapse-item__header {
    background: none;
}
</style>
<style scoped lang="less">
.addto-info2 .resumeedit .control-label {
    width: 160px;
}

.resume-item .resumeedit .control-label {
    width: 80px;
}

.resumeedit {
    border-radius: 4px;
}

.resume-item.rescompany {
    padding-left: 0px !important;
}

.container {
    width: 100%;
    height: calc(100vh - 125px);
    overflow: auto;
    margin-top: 15px;
}

.main-left {
    position: fixed;
    top: 95px;
    bottom: 30px;
    background: #fff;
}

.system-lt {
    border: 0px;
}

.system-rt {
    border: 0px;
}

.main-right {
    margin-left: 0px;
}

.navbar-header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.navbar-header span {
    font-size: 24px;
    color: #fc7b24;
    font-weight: bold;
}

.upload_div {
    width: 80px;
    height: 80px;
    border: 1px solid #e6e6e6;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

.upload_div input {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload_div i {
    font-size: 18px;
}

.add_list {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 10px;
}

.add_btn {
    width: 80px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #333333;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
}

.addmain {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 15px;
}

.register-tag {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.rule_content {
    width: 500px;
    display: inline-block;
}

.register-form-label {
    width: 32%;
}

.right_div {
    float: right;
}

.register-tag::before {
    display: none;
}

.register-tag::after {
    display: none;
}

.right_div {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.register-info .form-control {
    height: 40px;
    padding: 0px;
}

.form-control {
    height: 40px;
    padding: 0px;
}

.send_txt {
    width: 450px;
    background: #e6e6e6;
    padding: 5px;
    box-sizing: border-box;
}

.new_title {
    font-size: 16px;
    color: #333333;
    font-weight: bold;
    padding: 0 15px;
    box-sizing: border-box;
}

.resume_list {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.form-control {
    border: 0px;
    background: none;
    box-shadow: inset 0 0px 0px rgba(0, 0, 0, 0.075);
}

.resume-controls {
    width: 510px !important;
}

.halfw .resume-controls {
    width: 165px !important;
}

.form-flex {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.resume-controls textarea {
    width: 100%;
    resize: none;
    background: #fff;
    border-radius: 8px;
    border: 0px;
    outline: none;
    padding: 5px 15px;
}

.jayparentjob .control-label {
    width: 140px !important;
}

.form-group {
    margin-bottom: 5px !important;
}

.desc_title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 16px;
    font-weight: bold;
    color: #06c;
    padding: 15px 0;
    cursor: pointer;
}

.desc_title i {
    margin-left: 10px;
}

.jobinfo-list .control-label {
    width: 130px !important;
}

.jobinfo-list .resume-controls {
    width: 340px !important;
}

.main_content {
    width: calc(100% + 15px);
    background: #e4ede7;
    margin-left: -15px;
    box-sizing: border-box;
    padding-top: 15px;
    padding-bottom: 15px;
}

.resume-photo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.headimg {
    width: 120px;
    height: 120px;
    position: relative;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
}

.headimg img {
    width: 120px;
    height: 120px;

}

.resume-item.rescompany .register-tag {
    margin-left: 0px;
}

.resume-item .register-tag {
    padding-right: 15px !important;
}

.resume-controls #entryTime {
    width: 220px;
    height: 30px;
    outline: none;
    border: 1px solid #DCDFE6;
    padding: 0 10px;
    box-sizing: border-box;
    border-radius: 4px;
}

.resume-controls .entryTime {
    width: 220px;
    height: 30px;
    outline: none;
    border: 1px solid #DCDFE6;
    padding: 0 10px;
    box-sizing: border-box;
    border-radius: 4px;
}

.resumeedit.halfw .form-group {
    width: 33.33%;
}

.resumeedit.twohalfw .form-group {
    width: 50%;
}

.halfw .control-label {
    width: 70px !important;
}

.addmain {
    width: 560px;
}

.addmain:first-child {
    width: 560px;
}

.maxfontbold {
    font-weight: bold;
    color: #fc6c0b;
}

.center_div {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 16px;
    font-weight: bold;
    color: #06c;
    line-height: 20px;
    margin-bottom: 20px;
}

.borderdashed {
    border-bottom: 1px solid #fc7b24;
    border-top: 1px solid #fc7b24;
    width: calc(100% + 2px);
    margin-left: -1px;
    height: 10px;
    background: #ffffff;
}

.bordernext {
    border-bottom: 1px dashed #fc7b24;
    margin-bottom: 20px;
}

.resumeshow .form-group {
    margin-left: 15px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.resumeshow label {
    margin-bottom: 0px;
}

.resumeshow .resume-list {
    margin-bottom: 0px;
}

.fontBoldBlack {
    font-weight: bold;
}

.select_input {
    width: 100%;
    height: 30px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    background: #FFFFFF;
    cursor: pointer;
    padding: 0 15px;
    box-sizing: border-box;
    line-height: 30px;
    text-align: left;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    word-break: break-all;
}

.ul_li {
    width: 100%;
    line-height: 25px;
    font-size: 14px;
}

.am_left {
    width: 600px;
}

ul.jobinfo-list>li {
    padding: 5px !important;
}

ul.resume-list {
    margin-left: 20px;
}

.education-info {
    padding-left: 20px;
}

.jb2:before {
    display: none;
}



.jobinfo-text-title {
    min-width: 115px;
    width: 115px;
}

.disabledClass {
    background: #f5f5f5;
}

.upload_div_btn {
    position: relative;
    cursor: pointer;
    width: 40px;
    height: 40px;
}

.upload_div_btn input {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.headimg .iconmd {
    position: absolute;
    bottom: 0;
    right: 0;
}

.mainul li {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.mainul li .jobstate {
    width: 49.5%;
}

.mainul li:nth-child(2) {
    border-top: 1px solid #ddd;
}

.jobinfo-hd .jb_width1,
.jobinfo-hd .jb_width2,
.jobinfo-hd .jb_width3 {
    width: 49.5% !important;
}

.jayresumeshow {
    padding-left: 40px !important;
}

.jb2_width1 {
    display: flex !important;
}

.line_div {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jbleft {
    margin-left: 25px;
}

.kong_div {
    width: 100%;
    height: 30px;
}

.colorGray {
    color: #5a5a5a;
}
.download_btn{
    width: 75px;
    height: 35px;
    position: absolute;
    top: 485px;
    right: calc((100vw - 1200px) / 2);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fc6c0b;
    font-size: 14px;
    color: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

.saveResume_fixed {
    width: 150px;
    height: 35px;
    position: fixed;
    bottom: 100px;
    right: calc((100vw - 1300px) / 2);
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    color: #ffffff;
    border-radius: 4px;
    overflow: hidden;
}

.saveResume_btn {
    width: 75px;
    height: 35px;
    background: #fc6c0b;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fc6c0b;
    cursor: pointer;
}

.cancelResume_btn {
    width: 75px;
    height: 35px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e6e6e6;
    color: #111;
    cursor: pointer;
}
.reme_div{
    width: 100%;
    max-width: 1188px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    margin-bottom: 15px;
}
.reme_btn{
    width: 80px;
    height: 35px;
    background: #fc6c0b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 4px;
    cursor: pointer;
}
.remed_text{
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    flex-direction: column;
    font-size: 14px;
    color: #333333;
    margin-right: 15px;
    line-height: 25px;
}
.personal-rt{
    position: relative;
    border:0px;
    padding: 0px;
    margin: 0px;
}
.remed_right{
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.lin_div_list{
    width: 100%;
}
.line_litter{
    width: 100%;
    padding-left: 30px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.jobstate>span:first-child{
    width:14% !important; 
}
.addlabel-title{
    border-radius: 4px;
}
.addlabel-title>span{
    width: auto;
    border-radius: 4px;
    margin-left: 10px;
}
ul.jobinfo-list > li{
    padding-left: 20px !important;
}
</style>
